<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>在线考试系统 - 主页</title>
    <style>
        body { font-family: Arial, sans-serif; }
        .header {
            background: #007bff;
            color: white;
            padding: 10px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .container { padding: 20px; }
        .welcome { font-size: 20px; margin-bottom: 20px; }
        .logout-btn {
            background: #dc3545;
            color: white;
            border: none;
            padding: 5px 10px;
            border-radius: 3px;
            cursor: pointer;
        }
    </style>
</head>
<body>
<div class="header">
    <h1>在线考试系统</h1>
    <a href="/logout"><button class="logout-btn">退出登录</button></a>
</div>

<div class="container">
    <div class="welcome">
        欢迎您，<span th:text="${user.userName}"></span>！
        （<span th:text="${user.role}"></span>）
    </div>
    <h3>系统功能</h3>
    <ul>
        <li>考试管理</li>
        <li>成绩查询</li>
        <li>问卷管理</li>
        <li>考试过程监控</li>
    </ul>
</div>
</body>
</html>